#! /bin/bash

echo "0 > clean files"
echo "1 > build source files"
echo "2 > exec app file"
echo "3 > debug app file"
echo "please input:"
read num

if [ $num -eq 0 ] 
then
    rm -rf ./build
    echo "clean OK!"
elif [ $num -eq 1 ]
then
    rm -rf ./build
    mkdir build
    cd build
    cmake ..
    make 
    cd ../
elif [ $num -eq 2 ]
then
    ./build/out/app
else
    gdb ./build/out/app
fi